Signed-off-by: Guido Günther <agx@sigxcpu.org>
Origin: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31
Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/34
Bug-Debian: https://bugs.debian.org/
1126514
Applied-upstream: gnome-shell 50, commit:
798230599950607ec285daecd070f5bcb28580e4
Gbp-Pq: Topic libgvc
Gbp-Pq: Name mixer-stream-Allow-to-update-port-list.patch
GList *ports)
{
g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), FALSE);
- g_return_val_if_fail (stream->priv->ports == NULL, FALSE);
- stream->priv->ports = g_list_sort (ports, (GCompareFunc) sort_ports);
+ if (stream->priv->ports) {
+ g_list_free_full (stream->priv->ports, (GDestroyNotify) free_port);
+ stream->priv->ports = NULL;
+ }
+ if (ports)
+ stream->priv->ports = g_list_sort (ports, (GCompareFunc) sort_ports);
return TRUE;
}